package com.barbeque.mall.controller.wx;

import com.barbeque.mall.bean.BaseRespVo;
import com.barbeque.mall.bean.BaseRespVoNoData;
import com.barbeque.mall.bean.param.CommonData;
import com.barbeque.mall.bean.wx.aftersale.MarketAftersaleCommitBo;
import com.barbeque.mall.bean.wx.aftersale.MarketAftersaleDetaiVo;
import com.barbeque.mall.service.wx.WxAftersaleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Tezel
 * @since 2022/07/21 09:25
 */
@RestController
@RequestMapping("wx/aftersale")
public class WxAftersaleController {

    @Autowired
    WxAftersaleService wxAftersaleService;

    @RequestMapping("submit")
    public BaseRespVoNoData commit(@RequestBody MarketAftersaleCommitBo aftersaleCommitBo){

        wxAftersaleService.commit(aftersaleCommitBo);

        return BaseRespVoNoData.ok();

    }

    @RequestMapping("detail")
    public BaseRespVo detail(Integer orderId){

       MarketAftersaleDetaiVo data = wxAftersaleService.detail(orderId);

       return BaseRespVo.ok(data);

    }

}
